package com.yidu.menuProject.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.yidu.menuProject.action.vo.MealVo;
import com.yidu.menuProject.common.Pages;
import com.yidu.menuProject.model.MealModel;

public interface MealModelMapper {
    /**
     * 删除
     * @param vo
     * @return
     */
	int deleteByPrimaryKey(MealVo vo);

	int delete(MealVo vo);
	
    int insert(MealVo vo);
    /**
     * 增加
     * @param vo
     * @return
     */
    int insertSelective(MealVo vo);
    
    /**
     * 增加
     * @param po
     * @return
     */
    int insertSelectiveHWT(MealModel po);

    MealModel selectByPrimaryKey(String mealId);

    /**
     * 修改
     * @param record
     * @return
     */
    int updateByPrimaryKeySelective(MealVo vo);

    int updateByPrimaryKey(MealModel record);
    
    List<MealModel>selectFindAll(Map map);
    
    List<MealModel>selectFindAllVague(Map map);
   
    /**
    *查询所有 
    * @param page
    * @return
    */
    public List<MealModel> selectAll(Pages page);
    //行数
    public int selectCount(Pages page);
    
    /**
     * 审核查询所有
     * @param page
     * @return
     */
    public List<MealModel> select(Pages page);
    public int selectCounts(Pages page);
    
    /**
     * 查询收藏的店铺    
     * @return 集合
     */
    @Select("select * from meal where meal_id = #{mealId,jdbcType=VARCHAR}")
    public List<MealModel> findShop(@Param("mealId")String mealId );
}